
<template>
  <div class="page">
    <div class="top">
      <div class="left">
        <div class="e-tree-file">
          <div class="name">包件名称</div>
          <input class="ipt" type="text" placeholder="输入项目编号" />
          <span>
            <img src="@/assets/search.png" />
          </span>
          <el-tree
            :data="data"
            :props="defaultProps"
            @node-click="handleNodeClick"
          ></el-tree>
        </div>
      </div>
      <div class="right">
        <div class="right-top">
          <div class="left-btn">
            <el-button size="mini">新增</el-button>
            <img src="@/assets/piliang.png" />
            <span>进入批量管理</span>
          </div>
          <div class="right-search">
            <div class="right-ipt">
              <input class="ipt" type="text" placeholder="输入项目编号" />
              <img src="@/assets/search.png" />
            </div>
            <div class="right-btn">
              <el-button type="primary" size="mini" class="search"
                >高级搜索</el-button
              >
            </div>
          </div>
        </div>
        <div class="right-tabal">
          <el-table :data="tableData" border fit style="width: 942px">
            <el-table-column prop="name" label="项目名称" width="100px">
            </el-table-column>
            <el-table-column prop="number" label="项目编号" width="100px">
            </el-table-column>
            <el-table-column prop="unit" label="承建单位" width="200px">
            </el-table-column>
            <el-table-column prop="money" label="合同金额(万元)" width="120px">
            </el-table-column>
            <el-table-column
              prop="budgetingAgency"
              label="预算编制机构"
              width="200px"
            >
            </el-table-column>
            <el-table-column prop="budget" label="预算金额(万元)" width="120px">
            </el-table-column>
            <el-table-column prop="budget" label="预算金额(万元)" width="120px">
            </el-table-column>
            <el-table-column prop="budget" label="预算金额(万元)" width="120px">
            </el-table-column>
          </el-table>
        </div>
      </div>
    </div>
    <div class="bottom">
         <ComPagination />
    </div>
  </div>
</template>
<script>
import ComPagination from '@/components/pagination/pagination.vue'
export default {
    components: {
        ComPagination,
    },
    data () {
        return {
            data: [
                {
                    label: 'Lorem Ipsum1',
                    children: [
                        {
                            label: 'Lorem Ipsum1-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum1-1-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum2',
                    children: [
                        {
                            label: 'Lorem Ipsum2-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum2-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-2-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum3',
                    children: [
                        {
                            label: 'Lorem Ipsum3-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum3-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-2-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum4',
                    children: [
                        {
                            label: 'Lorem Ipsum4-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum4-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum4-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum4-2-1',
                                },
                            ],
                        },
                    ],
                },
            ],
            tableData: [
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
                {
                    name: 'SAD11',
                    number: '直营经理部',
                    unit: '四川路桥公路建设有限公司',
                    money: '128.11',
                    budgetingAgency: '四川公路桥梁建设有限公司',
                    budget: '250',
                },
            ],
            defaultProps: {
                children: 'children',
                label: 'label',
            },
        }
    },
    methods: {
        handleNodeClick () {},
    },
}
</script>
<style lang="scss" scoped>
.page {
  width: 90%;
  height: 90%;
  margin: auto;
  margin-top: 10px;
  display: flex;
  flex-direction: column;

  .top {
    flex: 1;
    display: flex;

    .left {
      width: 200px;
      border: 1px solid #ccc;
      border-radius: 5px;
      box-sizing: border-box;
      position: relative;
      .name {
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-weight: 700;
        background-color: rgb(224, 231, 249);
      }
      .ipt {
        height: 30px;
        border-radius: 5px;
        margin-top: 15px;
        margin-bottom: 15px;
        margin-left: 12px;
        cursor: pointer;
        border: 1px solid #ccc;
      }
      img {
        width: 15px;
        height: 15px;
        position: absolute;
        top: 64px;
        right: 35px;
        cursor: pointer;
      }
      ::placeholder {
        color: #cccc;
        padding-left: 10px;
      }
    }
    .right {
      flex: 1;
      margin-left: 10px;
      display: flex;
      flex-direction: column;

      .right-top {
        height: 50px;
        display: flex;
        justify-content: space-between;
        border: 1px solid #ccc;
        border-radius: 5px;
        .left-btn {
          width: 200px;
          ::v-deep.el-button--mini {
            margin-top: 10px;
            margin-left: 5px;
            color: #fff;
            background-color: rgb(122, 168, 24);
          }
          img {
            width: 15px;
            height: 15px;
            margin-left: 20px;
            margin-right: 3px;
          }
          span {
            font-size: 12px;
            cursor: pointer;
          }
        }
        .right-search {
          width: 260px;
          position: relative;
          display: flex;
          .right-ipt {
            width: 70%;
            height: 100%;

            .ipt {
              width: 160px;
              height: 26px;
              border: 0;
              border: 1px solid #ccc;
              border-radius: 5px;
              margin-top: 10px;
            }
            img {
              width: 15px;
              height: 15px;
              position: absolute;
              top: 17px;
              left: 130px;
              cursor: pointer;
            }
            ::placeholder {
              color: #cccc;
              padding-left: 10px;
            }
          }
          .right-btn {
            width: 30%;
            height: 100%;
            padding-right: 10px;
            .search {
              width: 76px;
              height: 30px;
              margin-top: 10px;
            }
          }
        }
      }
      .right-tabal {
        flex: 1;
        margin-top: 10px;

        ::v-deep.has-gutter th {
          background: #e0e7f9 !important;
          color: #000;
        }
        ::v-deep.el-table--enable-row-hover .el-table__body tr:hover {
          font-weight: bold;
        }
        ::v-deep.el-table ::v-deep .el-table__expand-icon--expanded {
          transform: none;
        }
        ::v-deep.el-tree ::v-deep .el-tree-node__expand-icon.expanded {
          -webkit-transform: rotate(0deg);
          transform: rotate(0deg);
        }

        ::v-deep.cell {
          display: flex;
          align-items: center;
        }
        //滚动条

      }
    }
  }
  .bottom {
    height: 30px;
    margin-top: 20px;

  }
  ::v-deep{
      .el-pagination {
          margin-top: 0px;
      }
  }
     ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
    width: 6px; // 横向滚动条
    height: 10px; // 纵向滚动条
  }
  // 滚动条的滑块
  ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 5px;
  }
}
</style>

